//
//  SAFeedbackListChildViewController.m
//  SunOn
//
//  Created by mc on 2017/5/4.
//  Copyright © 2017年 NeoZhang. All rights reserved.
//  我反馈的问题List界面 子界面

#import "SAFeedbackListChildViewController.h"
#import "SAFeedBackTableViewCell.h"
#import "SAFeedBackDetaileViewController.h"
@interface SAFeedbackListChildViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) UITableView *tabview;

@end

@implementation SAFeedbackListChildViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view addSubview:self.tabview];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    UIStoryboard *story = [UIStoryboard storyboardWithName:@"Feedback" bundle:nil];
    SAFeedBackDetaileViewController *feedback = [story instantiateViewControllerWithIdentifier:@"SAFeedBackDetaileViewController"];
    feedback.title = @"反馈详情";
    [self.navigationController pushViewController:feedback animated:YES];
}
#pragma mark - UITableViewDataSource

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 10;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    SAFeedBackTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SAFeedBackTableViewCell" forIndexPath:indexPath];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    [cell configurefeedbackPeopleshow:YES];
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 292;
}
#pragma mark - setter&getter
- (UITableView *)tabview {
    if (!_tabview) {
        self.tabview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SASCREEN_WIDTH, SASCREEN_HEIGHT - 104) style:(UITableViewStylePlain)];
        self.tabview.delegate = self;
        self.tabview.dataSource = self;
        [self.tabview registerNib:[UINib nibWithNibName:@"SAFeedBackTableViewCell" bundle:nil] forCellReuseIdentifier:@"SAFeedBackTableViewCell"];
        self.tabview.showsVerticalScrollIndicator = NO;
        self.tabview.showsHorizontalScrollIndicator = NO;
        self.tabview.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
    return _tabview;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
